<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Using gdbus-codegen: GIO Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="ch35.html" title="Migrating to GDBus">
<link rel="prev" href="ch35s04.html" title="Creating proxies for well-known names">
<link rel="next" href="gio-hierarchy.html" title="Object Hierarchy">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch35.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch35s04.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gio-hierarchy.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="gdbus-example-gdbus-codegen"></a>Using gdbus-codegen</h2></div></div></div>
<p>
      dbus-glib comes with <span class="command"><strong>dbus-binding-tool</strong></span>, which
      can produce somewhat nice client- and server-side wrappers for a D-Bus interface.
      With GDBus, <span class="command"><strong><a href="gdbus-codegen.html">gdbus-codegen</a></strong></span> is used and like
      its counterpart, it also takes D-Bus Introspection XML as input:
    </p>
<div class="example">
<a name="gdbus-example-codegen-input"></a><p class="title"><b>Example 2. Example D-Bus Introspection XML</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting">FIXME<span class="gtkdoc opt">:</span> MISSING XINCLUDE CONTENT</pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<br class="example-break"><p>
      If this XML is processed like this
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6</pre></td>
        <td class="listing_code"><pre class="programlisting">gdbus<span class="gtkdoc opt">-</span>codegen <span class="gtkdoc opt">--</span>interface<span class="gtkdoc opt">-</span>prefix org<span class="gtkdoc opt">.</span>gtk<span class="gtkdoc opt">.</span>GDBus<span class="gtkdoc opt">.</span>Example<span class="gtkdoc opt">.</span>ObjectManager<span class="gtkdoc opt">.</span> \
              <span class="gtkdoc opt">--</span>generate<span class="gtkdoc opt">-</span>c<span class="gtkdoc opt">-</span>code generated<span class="gtkdoc opt">-</span>code	                      \
              <span class="gtkdoc opt">--</span>c<span class="gtkdoc opt">-</span><span class="keyword">namespace</span> Example 				      \
              <span class="gtkdoc opt">--</span>c<span class="gtkdoc opt">-</span>generate<span class="gtkdoc opt">-</span>object<span class="gtkdoc opt">-</span>manager			      \
              <span class="gtkdoc opt">--</span>generate<span class="gtkdoc opt">-</span>docbook generated<span class="gtkdoc opt">-</span>docs                       \
              gdbus<span class="gtkdoc opt">-</span>example<span class="gtkdoc opt">-</span>objectmanager<span class="gtkdoc opt">.</span>xml</pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
      then two files <code class="filename">generated-code.h</code> and
      <code class="filename">generated-code.c</code> are
      generated. Additionally, two XML files
      <code class="filename">generated-docs-org.gtk.GDBus.Example.ObjectManager.Animal</code> and
      <code class="filename">generated-docs-org.gtk.GDBus.Example.ObjectManager.Cat</code>
      with Docbook XML are generated.
    </p>
<p>
      While the contents of <code class="filename">generated-code.h</code> and
      <code class="filename">generated-code.c</code> are best described by the
      <span class="command"><strong><a href="gdbus-codegen.html">gdbus-codegen</a></strong></span> manual
      page, brief examples of how this generated code can be used can be found in
      <a class="xref" href="">???</a>
      and <a class="xref" href="">???</a>.
    </p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>